import config from '../../../../config/config.js'

// module
export default {
  data () {
    return {
      menu: Artery.findComponentUpward(this, config.prefix + '-menu')
    }
  },
  computed: {
    hasParentSubmenu () {
      return !!Artery.findComponentUpward(this, config.prefix + '-submenu')
    },
    parentSubmenuNum () {
      return Artery.findComponentsUpward(this, config.prefix + '-submenu').length
    },
    mode () {
      return this.menu.mode
    }
  }
}
